import { createApp } from 'vue'
import MessageBox from '@/components/MessageBox.vue'
export function showMsg(msg: string) {
  const app = createApp(MessageBox, {
    msg,
  })
  const div = document.createElement('div')

  document.body.appendChild(div)

  return () => {
    app.unmount()
    div.remove()
  }
}
